<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <h2>学校名称：{{name}}</h2>
        <h2>学校地址：{{address}}</h2>
    </div>
    <script>
        Vue.config.productionTip = false
        //new Vue()时，vue会
        //1.加工data，给data的所有key添加get set方法
        //2.vm._data=data
        let vm = new Vue({
            el: "#root", 
            data: { 
                name:'atgg',
                address: 'bj',
                student: {
                    name: 'tom',
                    age: {
                        rAge: 40, //真实年龄
                        sAge: 29, //对外年龄
                    },
                    friends: [
                        {
                            name: 'jerry',
                            age: 30
                        }
                    ]
                }
            }
        })
    </script>
</body>
</html>